//
//  LCZMovieTableCell.m
//  PersonalNews
//
//  Created by Golibyo on 15/11/29.
//  Copyright © 2015年 changshuhua. All rights reserved.
//

#import "LCZMovieTableCell.h"

@implementation LCZMovieTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    self.backView = [[LCZBaseView alloc] init];
    [self.contentView addSubview:self.backView];
    self.backView.layer.cornerRadius = 10 / 375.0 * WIDTH;
    self.backView.backgroundColor = [UIColor whiteColor];
    self.firstLabel = [[LCZBaseLabel alloc] init];
    [self.backView addSubview:self.firstLabel];
//        self.firstLabel.backgroundColor = [UIColor yellowColor];
    self.secLabel = [[LCZBaseLabel alloc] init];
    [self.backView addSubview:self.secLabel];
//        self.secLabel.backgroundColor = [UIColor blackColor];
    self.myImageView = [[LCZBaseImageView alloc] init];
    [self.backView addSubview:self.myImageView];
//        self.myImageView.backgroundColor = [UIColor blueColor];
    self.button = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.backView addSubview:self.button];
    
//    self.button.backgroundColor = [UIColor yellowColor];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.backView.frame = CGRectMake(0, 5 / 250.0 * CONHEIGHT, WIDTH, 240 / 250.0 * CONHEIGHT);
    self.firstLabel.frame = CGRectMake(15 / 375.0 * WIDTH, 10 / 250.0 * CONHEIGHT, 300 / 375.0 * WIDTH, 15 / 250.0 * CONHEIGHT);
    self.secLabel.frame = CGRectMake(15 / 375.0 * WIDTH, 35 / 250.0 * CONHEIGHT, 300 / 375.0 * WIDTH, 10 / 250.0 * CONHEIGHT);
    self.secLabel.font = [UIFont systemFontOfSize:12 / 375.0 * WIDTH];
    //    self.secLabel.textColor = [UIColor grayColor];
    self.myImageView.frame = CGRectMake(15 / 375.0 * WIDTH, 50 / 250.0 * CONHEIGHT, 345 / 375.0 * WIDTH, 180 / 250.0 * CONHEIGHT);
    self.button.frame = CGRectMake(0, 0, 50 / 375.0 * WIDTH, 50 / 375.0 * WIDTH);
    self.button.layer.cornerRadius = 25 / 375.0 * WIDTH;
    self.button.layer.masksToBounds = YES;
    [self.button setBackgroundImage:[UIImage imageNamed:@"playButton.jpg"] forState:UIControlStateNormal];
    self.button.center = self.myImageView.center;
    
    
    
}

@end
